<?php

/**
 * User form.
 *
 * @package    front-symfony-1.4.x
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class UserForm extends BaseUserForm
{
  public function configure()
  {
      parent::configure();

      $userTypes = UserTypeRestResource::singleton()->findAllAndMap('id', 'description');

      $this->widgetSchema['fullName']->setLabel('Full name');
      $this->widgetSchema['admin']->setLabel('Admin ?');
      $this->widgetSchema['active']->setLabel('Active ?');
      $this->widgetSchema['typeId'] = new sfWidgetFormChoice(array('choices' => $userTypes, 'label' => 'Type'));

      $this->validatorSchema['email'] = new sfValidatorEmail();
  }
}
